package com.gm.wholesale.module.report.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.gm.wholesale.R;

public class ReportTabTimeView extends androidx.appcompat.widget.AppCompatTextView {

    public ReportTabTimeView(@NonNull Context context) {
        super(context);
        initView();
        showUnCheck();
    }

    public ReportTabTimeView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        showUnCheck();
    }

    public void showCheck(){
        setBackgroundResource(R.drawable.good_tab_item_check_shap);
        setTextColor(getResources().getColor(R.color.white));
    }

    public void showUnCheck(){

        setBackgroundResource(R.drawable.report_uncheck_time_shap);
        setTextColor(getResources().getColor(R.color.color_707070));
    }
    private void initView(){
        setGravity(Gravity.CENTER);
        setPadding(12,5,12,5);
    }
}
